<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script type="text/javascript">
        function dlt() {
            var ok =window.confirm("确认删除？")
            if(ok){
                alert("数据已经删除！")
            }else {
                alert("停止删除数据")
            }
        }
    </script>
</head>
<body>
    <input type="button" value="hello" onclick="window.alert('hello!')">
    <input type="button" value="confirm" onclick="dlt()">
</body>h
</html>